summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-01-07 13:33:38 +0100
committerGitHub <noreply@github.com>2024-01-07 13:33:38 +0100
commita972341b5d12ebfa5be4138a741dd570629f3082 (patch)
tree960461ca4c12296ffa19feff6cc3660484a73939
parentMerge pull request #12576 from t895/total-save-manager (diff)
parentservice: hid: Make sure there's an active aruid handle (diff)
downloadyuzu-a972341b5d12ebfa5be4138a741dd570629f3082.tar
yuzu-a972341b5d12ebfa5be4138a741dd570629f3082.tar.gz
yuzu-a972341b5d12ebfa5be4138a741dd570629f3082.tar.bz2
yuzu-a972341b5d12ebfa5be4138a741dd570629f3082.tar.lz
yuzu-a972341b5d12ebfa5be4138a741dd570629f3082.tar.xz
yuzu-a972341b5d12ebfa5be4138a741dd570629f3082.tar.zst
yuzu-a972341b5d12ebfa5be4138a741dd570629f3082.zip
-rw-r--r--src/hid_core/resources/npad/npad.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp
index e6c035628..97f31d26e 100644
--- a/src/hid_core/resources/npad/npad.cpp
+++ b/src/hid_core/resources/npad/npad.cpp
@@ -870,6 +870,11 @@ void NPad::InitializeVibrationDevice(
const auto aruid = applet_resource_holder.applet_resource->GetActiveAruid();
const auto npad_index = static_cast<Core::HID::NpadIdType>(vibration_device_handle.npad_id);
const auto device_index = static_cast<std::size_t>(vibration_device_handle.device_index);
+
+ if (aruid == 0) {
+ return;
+ }
+
InitializeVibrationDeviceAtIndex(aruid, npad_index, device_index);
}